package com.yp.infrastructure.common.annotation.processor;

import com.yp.infrastructure.common.annotation.callback.LazyResourceFieldCallback;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;

/**
 *  * 合并Lazy与Resource标签
 */

@Component
public class LazyResourceBeanPostProcessor extends BaseAnnotationBeanPostProcessor {

    public LazyResourceBeanPostProcessor(ConfigurableListableBeanFactory beanFactory) {
        super(beanFactory);
    }

    @Override
    ReflectionUtils.FieldCallback getFieldCallback(ConfigurableListableBeanFactory bf, Object bean) {
        return new LazyResourceFieldCallback(bf, bean);
    }
}
